﻿using System.Collections.Generic;
using Shuba.Model;
namespace Shuba.Business
{
    public class Pipeline
    {
        private Data.Pipeline _Pipeline;

        public Pipeline()
        {
            _Pipeline = new Data.Pipeline();
        }

        public int GetRowNumberList(string value)
        {
            return _Pipeline.GetRowNumberList(value);
        }

        public List<PipelineInfo> GetList(string value, int currPage, int dataPerPage)
        {
            return _Pipeline.GetList(value, currPage, dataPerPage);
        }

        public List<PipelineInfo> GetList(string value)
        {
            return _Pipeline.GetList(value);
        }

        public int GetRowNumberPipelineApproval(string update_by)
        {
            return _Pipeline.GetRowNumberPipelineApproval(update_by);
        }

        public List<PipelineInfo> GetListApproval(string UPDATE_BY, int currPage, int dataPerPage)
        {
            return _Pipeline.GetListApproval(UPDATE_BY, currPage, dataPerPage);
        }

        public PipelineInfo Get(string ROW_ID)
        {
            return _Pipeline.Get(ROW_ID);
        }

        public bool IsExist(string UNIT_CODE, string FULL_NAME, string KODYA_KAB_BUSINESS, string ADDRESS_BUSINESS)
        {
            return _Pipeline.IsExist(UNIT_CODE, FULL_NAME, KODYA_KAB_BUSINESS, ADDRESS_BUSINESS);
        }

        public PipelineInfo GetApprovalByID(string UNIT_CODE, string FULL_NAME, string ADDRESS_BUSINESS)
        {
            return _Pipeline.GetApprovalByID(UNIT_CODE.Trim(), FULL_NAME.Trim(), ADDRESS_BUSINESS.Trim());
        }

        public List<PipelineInfo> GetListApproval(string value, string UpdateBy)
        {
            return _Pipeline.GetListApproval(value, UpdateBy);
        }

        public int Save(PipelineInfo _PipelineInfo)
		{
            return _Pipeline.Save(_PipelineInfo);
		}

        public int Approve(string UNIT_CODE, string FULL_NAME, string ADDRESS_BUSINESS, string ACT_TYPE)
        {
            return _Pipeline.Approve(UNIT_CODE.Trim(), FULL_NAME.Trim(), ADDRESS_BUSINESS.Trim(), ACT_TYPE);
        }

        public int ApproveBulk(string UNIT_CODE, string FULL_NAME, string KODYA_KAB_BUSINESS, string ADDRESS_BUSINESS, string ACT_TYPE)
        {
            return _Pipeline.ApproveBulk(UNIT_CODE.Trim(), FULL_NAME.Trim(), KODYA_KAB_BUSINESS.Trim(), ADDRESS_BUSINESS.Trim(), ACT_TYPE);
        }

        public int Reject(string UNIT_CODE, string FULL_NAME, string ADDRESS_BUSINESS)
        {
            return _Pipeline.Reject(UNIT_CODE.Trim(), FULL_NAME.Trim(), ADDRESS_BUSINESS.Trim());
        }

        public List<PipelineInfo> GetListAssignSO(string NIP, string VALUE)
        {
            return _Pipeline.GetListAssignSO(NIP, VALUE);
        }

        public List<PipelineInfo> GetListAssignSOPaging(string NIP, string VALUE, int currPage, int dataPerPage)
        {
            return _Pipeline.GetListAssignSOPaging(NIP, VALUE, currPage, dataPerPage);
        }

        public int GetRowNumberAssignSO(string NIP, string VALUE)
        {
            return _Pipeline.GetRowNumberAssignSO(NIP, VALUE);
        }

        public int UpdateAssigned(string ROW_ID, string ASSIGNED_TO, string UPDATE_BY)
        {
            return _Pipeline.UpdateAssigned(ROW_ID, ASSIGNED_TO, UPDATE_BY);
        }

        public int Update(PipelineInfo PIPELINE)
        {
            return _Pipeline.Update(PIPELINE);
        }

        public PipelineBulkInfo GetAll(string ROW_ID)
        {
            return _Pipeline.GetAll(ROW_ID);
        }


        public int saveTotmp(PipelineBulkInfo info)
        {
            return _Pipeline.Savetotmp(info);
        }

    }
}
